/*
 * GameObject.h
 *
 *  Created on: 03/05/2011
 *      Author: DessaVida
 */

#ifndef GAMEOBJECT_H_
#define GAMEOBJECT_H_

#include "Model.h"
#include "View.h"
#include "Controller.h"
#include "entity/component/ResourceManager.h"
#include "core/StateMachine.h"

class GameObject {
private:
	int ID;

	bool kill;
public:
	static int nextValidID;

	Model *model;
	View *view;
	Controller *controller;
	ResourceManager *resourceManager;

	StateMachine<GameObject>* stateMachine;

	State<GameObject>* stateIdle;
	State<GameObject>* stateWalk;
	State<GameObject>* stateRun;
	State<GameObject>* stateAttack;
	State<GameObject>* stateHitted;
	State<GameObject>* stateShoot;
	State<GameObject>* stateInteract;
	State<GameObject>* stateAction;
	State<GameObject>* stateDie;

	GameObject();
	virtual ~GameObject();
	/*
	 * Getters and Setters
	 */
	int getID() const;

	bool getKill() const;

	void setKill(bool kill);

	void destroyStates();

	string toString();

};

#endif /* GAMEOBJECT_H_ */
